package ai.people.netmon.telegram.mapstruct;

import ai.people.netmon.framework.domain.telegram.entity.Channels;
import ai.people.netmon.framework.domain.telegram.vo.channels.ChannelsView;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.springframework.stereotype.Repository;

/**
 * 渠道图结构
 *
 * @author yuanqinglong
 * @date 2022/1/24 16:43
 */
@Repository
@Mapper(componentModel = "spring")
public interface ChannelsMapStruct {


    @Mappings({
            @Mapping(source = "id", target = "id"),
            @Mapping(source = "groupname", target = "groupname"),
            @Mapping(source = "description", target = "description"),
            @Mapping(source = "members", target = "members"),
            @Mapping(source = "importanceDeg", target = "importanceDeg")
    })
    ChannelsView channelsToChannelsView(Channels channels);
}
